<?php

namespace App\Models;

use App\Util\Url;
use Illuminate\Database\Eloquent\Model;

class Recruit extends Model
{
    protected $table = "c_recruits";

    /**
     * @return array
     *
     */
    public static function getRecruitNotice()
    {
        $res = self::first();
        if (!empty($res)) {
            $res->image = Url::getHttpHost() . 'upload/' . $res->image;
            return $res->toArray();
        }
        return [];
    }
}
